extends "res://tscn/eventDlg/eventItemSel/itemSel.gd"

onready var anim = $anim

func init(item):
	.init(item)
	if item:
		item.connect("onSetWearer",self,"rWearer")
	rWearer()
	
func rWearer():
	isDrag = true
	if item and item.wearer != null:
		$wearer.show()
		anim.show()
		anim.init(item.wearer)
	else:
		$wearer.hide()
		anim.hide()


func _on_wearer_pressed():
	if item and item.wearer != null:
		sys.newDlg("res://tscn/charaDlg/charaDlg.tscn").init(item.wearer)
